﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ColdStorage;

namespace ColdStorage.DOL
{
    public class Cold_Storage
    {

        /// <summary>
        /// Attributes of Cold Storage
        #region Cold Storage Attributes
        String sprojectName;
        public String sProjectName
        {
            get { return sprojectName; }
            set { sprojectName = value; }
        }
        int ilocation;

        public int iLocation
        {
            get { return ilocation; }
            set { ilocation = value; }
        }
        string slocation;

        public string sLocation
        {
            get { return slocation; }
            set { slocation = value; }
        }


        String sprojectOwner;

        public String sProjectOwner
        {
            get { return sprojectOwner; }
            set { sprojectOwner = value; }
        }

        String sdescription;

        public String sDescription
        {
            get { return sdescription; }
            set { sdescription = value; }
        }
        #endregion
        
        /// </summary>


        // Create a list to manage room
        public List<Room> lRoom = new List<Room>();

        //Add a new Room into List Room
        public void AddRoom(Room aRoom)
        {
            lRoom.Add(aRoom);
        }
        
        //Delete a room from List Room
        public void DeleteRoom(Room dRoom)
        {
            lRoom.Remove(dRoom);
        }
        private double dbresult = 0;

        public double dbResult
        {
            get { return dbresult; }
            set { dbresult = value; }
        }

        //Calculate all room in List Room
        public void CalculateImplement()
        {
            foreach (Room r in lRoom)
            {
                dbresult += r.CalculateSumColdProductivity();
            }
        }
    }


}
